package com.zyt.controller;


import com.zyt.entity.Users;
import com.zyt.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class UsersController {
    @Autowired
    private UsersService usersService;
    @RequestMapping("/a")
    public String queryUserByUserNameAndPassword(String name,String password,Model model){
        Users users = usersService.queryUserByUserNameAndPassword(name, password);
        if (users!=null){
            return "selectAllPhone.do";
        }
        return "index.jsp";
    }

}
